home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lantools / blueprnt / bpbios.asm < prev    next >
Assembly Source File  |  1989-09-27  |  3KB  |  86 lines

  1. ;*************************************************************
  2. ;* Blueprint LAN BIOS Device Driver (BPBIOS.ASM, BPBIOS.ASM) *
  3. ;* by Craig Chaiken                                          *
  4. ;* June 20, 1989                                             *
  5. ;*************************************************************
  6.         include bpbioshd.mod
  7. code    segment
  8.         assume  cs:code,ds:code,es:code;
  9.         org     100h
  10.  
  11. start:  jmp     install
  12.  
  13. maxnode db      0
  14.  
  15.         include misc.mod
  16.         include physical.mod
  17.         include datalink.mod
  18.         include applicat.mod
  19.         include console.mod
  20.  
  21. control_interrupt       proc    far
  22.         push    bx
  23.         cmp     ah,get_nodes
  24.         jnz     cont_1
  25.         mov     al,cs:maxnode
  26.         jmp     cont_5
  27. cont_1: cmp     ah,set_nodes
  28.         jnz     cont_2
  29.         mov     cs:maxnode,al
  30.         jmp     cont_5
  31. cont_2: cmp     ah,install_port
  32.         jnz     cont_3
  33.         mov     bl,cs:maxnode
  34.         xor     bh,bh   ;build offset for physical interrupt vector entry
  35.         push    ax
  36.         add     bx,bx
  37.         add     bx,bx
  38.         add     bx,bx
  39.         add     bx,bx
  40.         add     al,al
  41.         add     al,al
  42.         xor     ah,ah
  43.         add     bx,ax
  44.         pop     ax
  45.         mov     word ptr cs:physical_interrupt_table[bx],dx     ;install vector
  46.         mov     word ptr cs:physical_interrupt_table[bx+2],ds
  47.         jmp     cont_5
  48. cont_3: cmp     ah,next_port
  49.         jnz     cont_4
  50.         inc     cs:maxnode
  51.         jmp     cont_5
  52. cont_4: cmp     ah,get_info
  53.         jnz     cont_5
  54.         mov     ax,word ptr cs:physical_interrupt_table[bx]+2
  55. cont_5: pop     bx
  56.         iret
  57. control_interrupt       endp
  58.  
  59. install proc    near
  60.         mov     ah,25h
  61.         mov     al,ctrl_int
  62.         mov     dx,offset control_interrupt
  63.         int     21h                     ;install bpbios control interrupt
  64.         mov     ah,25h
  65.         mov     al,phys_int
  66.         mov     dx,offset physical_interrupt
  67.         int     21h                     ;install physical layer interrupt
  68.         mov     ah,25h
  69.         mov     al,link_int
  70.         mov     dx,offset datalink_interrupt
  71.         int     21h                     ;install data link layer interrupt
  72.         mov     ah,25h
  73.         mov     al,appl_int
  74.         mov     dx,offset application_interrupt
  75.         int     21h                     ;install application layer interrupt
  76.         mov     dx,offset install+1
  77.         int     27h
  78. install endp
  79.  
  80. code    ends
  81.         end     start
  82.  
  83. ;*************************************************************
  84. ;* End of BPBIOS.ASM                                         *
  85. ;*************************************************************
  86.